﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZaxLib.Collections
{
	class DataGridEnumerator : IEnumerator
	{
		private CDataGrid _data;
		public CDataGrid Data
		{
			get
			{
				return _data;
			}
			set
			{
				_data = value;
			}
		}

		public DataGridEnumerator(CDataGrid inData)
		{
			Data = inData;
		}

		public bool MoveNext()
		{
			return Data.Next();
		}

		public void Reset()
		{
			Data.Start();
		}

		Object IEnumerator.Current
		{
			get
			{
				return Data.Row;
			}
		}
	}
}
